import dayjs from 'dayjs';
import { get } from 'lodash';
import util from '@/libs/util.js';

export default {
    namespaced: true,
    state: {
        region_code:'',
        region_id:'',
        screen:1,//大屏的个数比 比如2：2=1 4：2=2,
        mapTabDataIndex:0,//地图tab选中索引，默认选取第一个
        tabId:'tabId1'
    },
    getters: {

    },
    actions: {

    },
    mutations: {
       changRegionCode(state,value){
           state.region_code=value;
       },
       changeScreen(state,value){
            state.screen=value;
       },
       changeMapTbaDataIndex(state,value){
            state.mapTabDataIndex=value;
        },
        changeData(state,obj){
            if(_.isArray(obj)){
                obj.map(item=>{
                    state[item.name]=item.value;
                })
            }else{
                state[obj.name]=obj.value;
            }

        }
    }
}
